//
// Created by Zhangwj on 2023/9/26.
//

#ifndef COMPILE_TASK2_STMTNODE_H
#define COMPILE_TASK2_STMTNODE_H


#include "SyntaxTreeNode.h"
#include "../Parser.h"
#include "StmtItemNode/StmtItemNode.h"

//Stmt → LVal '=' Exp ';'
//| [Exp] ';'
//| Block
//| 'if' '(' Cond ')' Stmt [ 'else' Stmt ]
//| 'for' '(' [ForStmt] ';' [Cond] ';' [forStmt] ')' Stmt
//| 'break' ';' | 'continue' ';'
//| 'return' [Exp] ';'
//| LVal '=' 'getint''('')'';'
//| 'printf''('FormatString{','Exp}')'';'

class StmtNode : public SyntaxTreeNode {
public:
    std::unique_ptr<StmtItemNode> StmtItem;

    static std::unique_ptr<StmtNode> StmtParser(Parser &parser);
};


#endif //COMPILE_TASK2_STMTNODE_H
